package com.dc.designPattern._2_factory._3_absfactory.order;

import com.dc.designPattern._2_factory._3_absfactory.pizza.LdCheesePizza;
import com.dc.designPattern._2_factory._3_absfactory.pizza.LdPepperPizza;
import com.dc.designPattern._2_factory._3_absfactory.pizza.Pizza;


public class LdFactory implements AbsFactory {

	@Override
	public Pizza createPizza(String orderType) {
		System.out.println("~使用的是抽象工厂模式~");
		Pizza pizza = null;
		if (orderType.equals("cheese")) {
			pizza = new LdCheesePizza();
		} else if (orderType.equals("pepper")) {
			pizza = new LdPepperPizza();
		}
		return pizza;
	}

}